package top.infopub.mgr.cap.service;


import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import top.infopub.dto.cap.PayfeeApplyDto;
import top.infopub.generic.GenericService;
import top.infopub.mgr.cap.domain.PayfeeApplyDomain;
import top.infopub.mgr.cap.jsonvo.PayfeeApplyJsonVo;
import top.infopub.mgr.cap.vo.PayfeeApplyVo;
import top.infopub.mgr.common.vo.RspVo;
import top.infopub.model.cap.*;
import top.infopub.model.mkt.ProjectAttachment;
import top.infopub.security.vo.AuthorizationVO;

import java.util.List;


public interface PayfeeApplyService extends GenericService<PayfeeApply, String> {

    /**
     * 根据条件查询融资-付费申请记录
     * @param payfeeApplyVo
     * @return 
     * @see
     */
    Page<PayfeeApplyDomain> selectByDomainWhere(Page<PayfeeApplyDomain> page,
                                                PayfeeApplyVo payfeeApplyVo);


    /*融资付费详情*/
    PayfeeApplyJsonVo queryDetailById(@Param("id")String id);


    /**
     * 编辑信息
     * @param payfeeApplyDto
     * @param payfeeApplyInfo
     * @param attachmentList
     * @param submitType
     * @param vo
     * @return
     */
    RspVo edit(PayfeeApplyDto payfeeApplyDto, List<PayfeeApplyInfo> payfeeApplyInfo,
               List<ProjectAttachment> attachmentList, Integer submitType, AuthorizationVO vo);


    /**
            * 编辑财务信息
     * @param payfeeApply
     */
    RspVo modifyFinInfo(PayfeeApply payfeeApply, AuthorizationVO vo);




    /**
     * 根据条件查询融资-付费申请记录-我审批的
     * @param payfeeApplyVo
     * @return 
     * @see
     */
    Page<PayfeeApplyDomain> selectMyCheckByDomainWhere(Page<PayfeeApplyDomain> page,
                                                       PayfeeApplyVo payfeeApplyVo);

    /**
     * 新增-付费申请记录
     */
    void savePayfeeApply(PayfeeApply payfeeApply, List<PayfeeApplyDetail> payfeeApplyDetails,
                         List<PayfeeApplyAtt> payfeeApplyAtts);
    
    /**
     * 通过id查询融资-付费记录详情
     */
    PayfeeApplyVo selectById(String id);
    
    /**
     * 通过id查询融资-付费记录和付款公司详情
     */
    PayfeeApplyVo selectByGuid(String id);

    PayfeeApplyDto queryOneByProCode(String proCode);
}